﻿namespace NthDownload.Common.Plugins
{
    public class BandwidthProviderPluginContractNameService
    {
        #region Static Methods

        /// <summary>
        /// Creates a contract name suitable for registering a bandwidth provider factory with an MEF container
        /// </summary>
        /// <param name="downloadPluginGUID">The GUID of the download plugin which will spawn the factory.</param>
        public static string CreateBandwidthProviderFactoryContractName(string downloadPluginGUID)
        {
            return string.Format("{0}{1}", "BPF-", downloadPluginGUID);
        }

        /// <summary>
        /// Creates a contract name suitable for registering a bandwidth provider UI service with an MEF container
        /// </summary>
        /// <param name="downloadPluginGUID">The GUID of the download plugin which will spawn the Ui service.</param>
        public static string CreateBandwidthProviderUIServiceContractName(string downloadPluginGUID)
        {
            return string.Format("{0}{1}", "BPUIS-", downloadPluginGUID);
        }

        /// <summary>
        /// Creates a contract name suitable for registering a bandwidth provider serialization service with an MEF container
        /// </summary>
        /// <param name="downloadPluginGUID">The GUID of the download plugin which will spawn the serialization service.</param>
        public static string CreateBandwidthProviderXmlSerializationServiceContractName(string downloadPluginGUID)
        {
            return string.Format("{0}{1}", "BPSPXML-", downloadPluginGUID);
        }

        #endregion Static Methods
    }
}
